package org.example.blog.controller.admin;


import org.example.blog.pojo.Category;
import org.example.blog.response.ResponseResult;
import org.springframework.web.bind.annotation.*;

/*
*
*   管理中心，分类的API
*
* */

@RestController
@RequestMapping("/admin/category")

public class GategoryAdminApi {


    @PostMapping
    /**
     *
     * 添加分类
     * @param category
     * @return org.example.blog.response.ResponseResult
     */
    public ResponseResult addCategory(@RequestBody Category category){
        return null;
    }


    @DeleteMapping("/{categoryId}")
    /**
     * 删除分类
     * @param categoryId
     * @return org.example.blog.response.ResponseResult
     */
    public ResponseResult deleteCategory(@PathVariable("categoryId") String categoryId){
        return null;
    }

    @PutMapping("/{categoryId}")
    /**
     * 更新分类
     * @param categoryId
    * @param category
     * @return org.example.blog.response.ResponseResult
     */
    public ResponseResult updateCategory(@PathVariable("categoryId") String categoryId, @RequestBody Category category){
        return null;
    }

    @GetMapping("/{categoryId}")
    /**
     *  查找分类
     * @param categoryId
     * @return org.example.blog.response.ResponseResult
     */
    public ResponseResult getCategory(@PathVariable("categoryId") String categoryId){
        return null;
    }

    @GetMapping("/list")
    /**
     *
     * 分页查询分类
     * @param page
    * @param size
     * @return org.example.blog.response.ResponseResult
     */
    public ResponseResult listCategory(@RequestParam("page") int page, @RequestParam("size") int size){
        return null;
    }
}
